#!/usr/bin/env python
#-*-conding:utf-8-*-

import requests # 发送http请求

headers = {
	'user-agent':'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.26 Safari/537.36 Core/1.63.6788.400 QQBrowser/10.3.2864.400',
	'referer':'https://manhua.dmzj.com/mxwbt/459.shtml'
}

path = 'C:/Users/Administrator/Desktop/tmp'

img_url = 'https//images.dmzj.com/m/%E5%86%92%E9%99%A9%E7%8E%8B%E6%AF%94%E7%89%B9/vol_02/shingfan_adventure_02_001.jpg'

# 下载图片
def download_img(img_url, path, headers):
	response = requests.get(url=img_url,headers=headers)
	name = path + "/" + img_url.split('/')[-1]
	with open(name, "ab") as f:
		f.write(response.content)

download_img(img_url, path, headers)